@using Extension.k8s
@inherits BlazorApp.Pages.Common.PageBase

@if (Pod != null && Pod.Status.ContainerStatuses != null)
{
    <Space>
        @foreach (var cs in Pod.Status.ContainerStatuses)
        {
            <SpaceItem>
                <Tooltip Title="@(cs.ReadySummary())" ArrowPointAtCenter="true">
                    @if (cs.Ready)
                    {
                        <Badge Status="success"/>
                    }else if (cs.State.Terminated is { ExitCode: 0 })
                    {
                        <Badge Status="default"/>
                    }
                    else
                    {
                        <Badge Status="error"/>
                    }
                </Tooltip>
            </SpaceItem>
        }
    </Space>
}
